package com.design.graduation.asdemo.dao;

import android.database.sqlite.SQLiteDatabase;

import java.util.Map;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;

import com.design.graduation.asdemo.model.Test;
import com.design.graduation.asdemo.model.SolicitInfo;
import com.design.graduation.asdemo.model.DetailsInfo;

import com.design.graduation.asdemo.dao.TestDao;
import com.design.graduation.asdemo.dao.SolicitInfoDao;
import com.design.graduation.asdemo.dao.DetailsInfoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig testDaoConfig;
    private final DaoConfig solicitInfoDaoConfig;
    private final DaoConfig detailsInfoDaoConfig;

    private final TestDao testDao;
    private final SolicitInfoDao solicitInfoDao;
    private final DetailsInfoDao detailsInfoDao;

    public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        testDaoConfig = daoConfigMap.get(TestDao.class).clone();
        testDaoConfig.initIdentityScope(type);

        solicitInfoDaoConfig = daoConfigMap.get(SolicitInfoDao.class).clone();
        solicitInfoDaoConfig.initIdentityScope(type);

        detailsInfoDaoConfig = daoConfigMap.get(DetailsInfoDao.class).clone();
        detailsInfoDaoConfig.initIdentityScope(type);

        testDao = new TestDao(testDaoConfig, this);
        solicitInfoDao = new SolicitInfoDao(solicitInfoDaoConfig, this);
        detailsInfoDao = new DetailsInfoDao(detailsInfoDaoConfig, this);

        registerDao(Test.class, testDao);
        registerDao(SolicitInfo.class, solicitInfoDao);
        registerDao(DetailsInfo.class, detailsInfoDao);
    }
    
    public void clear() {
        testDaoConfig.getIdentityScope().clear();
        solicitInfoDaoConfig.getIdentityScope().clear();
        detailsInfoDaoConfig.getIdentityScope().clear();
    }

    public TestDao getTestDao() {
        return testDao;
    }

    public SolicitInfoDao getSolicitInfoDao() {
        return solicitInfoDao;
    }

    public DetailsInfoDao getDetailsInfoDao() {
        return detailsInfoDao;
    }

}
